UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eC7vx3AwUJ3VC8J+iFLKlwAsY0V6Nr+opEOsELvfEH4='
WHERE
key_id = '1389ab3c4c1fe4fdf402578fe192fbe4bea94a649d1a9c8e90f8b5272f125a1a'
AND (
token = 'eC7vx3AwUJ3VC8J+iFLKlwAsY0V6Nr+opEOsELvfEH4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)