UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'p732G3/Xw6s+VOL4dDUmA/Dt0RoDL4jMhn5TvoVzXEw='
WHERE
key_id = '79ffcec7bf06334a11e8ffe6933fe6eb7dc267d5842fc1f992a4ea72d6b94e54'
AND (
token = 'p732G3/Xw6s+VOL4dDUmA/Dt0RoDL4jMhn5TvoVzXEw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)