UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SYIWsXP7//h3uWr/90EE1mJ2z1HHomLFJ7/jVgp4bIg='
WHERE
key_id = 'd953756cec8e7577f01a55419c541a6d6fafa0db562c4089a9d3079898821500'
AND (
token = 'SYIWsXP7//h3uWr/90EE1mJ2z1HHomLFJ7/jVgp4bIg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)