UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'usB1Pn7RU3VCj9Vt9o6ES75jSqDJQAptZs77OA8/LOQ='
WHERE
key_id = 'e656122f80a15e225a294a07e46d0c03010635019566bee2154905ed10ab6d76'
AND (
token = 'usB1Pn7RU3VCj9Vt9o6ES75jSqDJQAptZs77OA8/LOQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)