UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'b8+4pnCux9EkSI0c2OO4oXrU1Hc4yEMp7EBzveLTiUU='
WHERE
key_id = '3fc521ec454e3edc43b50419c8cb50013918ec6175e19393deaabf6178691601'
AND (
token = 'b8+4pnCux9EkSI0c2OO4oXrU1Hc4yEMp7EBzveLTiUU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)