UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hKIh9rjI7qU8swwv++ufun3PFzzwGOH6XXK0ll0W3Rw='
WHERE
key_id = '0cc67c2da396d1e118873a735cc276ec4add0fd8d6fb16d5e644d90fb1c778aa'
AND (
token = 'hKIh9rjI7qU8swwv++ufun3PFzzwGOH6XXK0ll0W3Rw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)