UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ICiNEOktsM+vnouPVPUgU4L6erSu9oGNBukbnyvz2o0='
WHERE
key_id = '66203fdaa868f53d632076cabcb7639af3b18a3717b07aba1b6a9ff760dc1902'
AND (
token = 'ICiNEOktsM+vnouPVPUgU4L6erSu9oGNBukbnyvz2o0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)