UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ukPJD5nwNjCWsg/QABFYoTTqVYR8RvtA6SMwmgDPl0Q='
WHERE
key_id = '3cb0b9e4faa1ce25f413ef186d01fa185665b489b4518c23b223cd3b991f088f'
AND (
token = 'ukPJD5nwNjCWsg/QABFYoTTqVYR8RvtA6SMwmgDPl0Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)