UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9QFW0TXRiCZRRAxVLIk2zRlpuhjz8dkA5ER6IhKtebE='
WHERE
key_id = 'c93086aff56e857cb0c9756ec9d74a494a10548ff8fdf9ff52ec83219bc40b6f'
AND (
token = '9QFW0TXRiCZRRAxVLIk2zRlpuhjz8dkA5ER6IhKtebE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)