UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FcZlH4FC3V2tiomRCqdvBGQD7TX9dAyZQSU2hgo/bUg='
WHERE
key_id = '3294d671f6daa51493dac7989cfe6643350dff0a9ab04974e5198b0ccad86475'
AND (
token = 'FcZlH4FC3V2tiomRCqdvBGQD7TX9dAyZQSU2hgo/bUg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)