UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JruYzWWw53/xpV6li/BdugW2UzTX55cuft0Z+ck+3J4='
WHERE
key_id = '408fe6d70f479093b90451323cee71d1bbec8b73b5f1a8b63abbe82e96d7fc95'
AND (
token = 'JruYzWWw53/xpV6li/BdugW2UzTX55cuft0Z+ck+3J4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)