UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8MVR3LJnTS6xSp9cLcvmM9Ih6YJBh9MQ1ZguHCkkLmA='
WHERE
key_id = '7b5ebe62cd4e715e21fa6c0fbfb78a24561da283f9fed44855c9d7e5166afaaa'
AND (
token = '8MVR3LJnTS6xSp9cLcvmM9Ih6YJBh9MQ1ZguHCkkLmA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)