UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Um8Qv0n4GC2hCl3RtzWNmmfgsUjQSyNy4zRL5+tipqU='
WHERE
key_id = '9d53d9b73d357bf8f3697b3c05aa90a4c850593e4c4a501061d4643807a99e56'
AND (
token = 'Um8Qv0n4GC2hCl3RtzWNmmfgsUjQSyNy4zRL5+tipqU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)