UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FUqp4/NGUROW7u8jPyEHCRW9jD7tMLghCxzJTn6c6bA='
WHERE
key_id = 'c921e3a3eb7ed7c9d31a758e18f96099bda929eae5df71f08b5413eaf65b80b5'
AND (
token = 'FUqp4/NGUROW7u8jPyEHCRW9jD7tMLghCxzJTn6c6bA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)