UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'anaL6m2K7NQwefjkpDG7qnez/0yb+iZf6ZI/eyzYCO0='
WHERE
key_id = '75955b4719d5329c1558b419a378595ecd98aea6590eb1ada2b9d9931ab5b5d4'
AND (
token = 'anaL6m2K7NQwefjkpDG7qnez/0yb+iZf6ZI/eyzYCO0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)