UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zSsvxjqCRzIfiE1Ew2giLyi4ZYfLNtFtYMSrmcIy1+U='
WHERE
key_id = 'adce3e4b84be277d0b40f310f8bc3626ac191ef0451bc489ca489b69f0f59cc8'
AND (
token = 'zSsvxjqCRzIfiE1Ew2giLyi4ZYfLNtFtYMSrmcIy1+U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)