UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7fEEdMh+VccjEySu/rvoRIoicQmG/FEp3UNkIrUxih4='
WHERE
key_id = 'eef4476d8724a4c1a5c2c1c49f34fecdb385cf140f1bc46dfbc5889c0b25e388'
AND (
token = '7fEEdMh+VccjEySu/rvoRIoicQmG/FEp3UNkIrUxih4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)