UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FMrbiM6IkfHx6ACmUuHDbabNMQMTszwoGvqACr6Swys='
WHERE
key_id = '5cb8ea85e0e8d1c7e5923bfc1d78f8df24cfcbc706e0bfef6043fa10c260849c'
AND (
token = 'FMrbiM6IkfHx6ACmUuHDbabNMQMTszwoGvqACr6Swys='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)