UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9hj/79mS/TantR/VDjyinuaxEdwE+DbvkgReKBlmk7k='
WHERE
key_id = 'b8d950d5d499a46c7f7512c6a8ad3ab16666cdacd0e8d325f61500b0a49cc81c'
AND (
token = '9hj/79mS/TantR/VDjyinuaxEdwE+DbvkgReKBlmk7k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)