UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fbygakX04E9lZOnvkw0wNoX0hEVyn8HGJUy/2NifFZk='
WHERE
key_id = '69c25dc4abe9b9679d025cf6f82bdc4ab4d37bfc1a8354b69d60a1f38c7ff088'
AND (
token = 'fbygakX04E9lZOnvkw0wNoX0hEVyn8HGJUy/2NifFZk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)