UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rqVMtBfJbGLsLtpQWRRh7qn/8sZQAGFXku28gO1dbes='
WHERE
key_id = 'e76e4fc1554b30e4becfcdcbdfdbb44c4160cbdf694e3520f66998b2f35d3c08'
AND (
token = 'rqVMtBfJbGLsLtpQWRRh7qn/8sZQAGFXku28gO1dbes='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)