UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eeiJcVkMPbnVZ96aC6nFTV6LEN7JEOr6s4SxCKtKzUw='
WHERE
key_id = '7bc1dcca1715ab8eed54d67669a0ca0bb3244ebabc7cb46ead2ccb3942644da7'
AND (
token = 'eeiJcVkMPbnVZ96aC6nFTV6LEN7JEOr6s4SxCKtKzUw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)