UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nsViyu1BBvyJ1e1LT3ZbPrbr0i26gOia9RAN6/ZN5NA='
WHERE
key_id = '8d1d1b856690a9c597538cfea7eabb315ea92d76056496b0872c214b9dce32cc'
AND (
token = 'nsViyu1BBvyJ1e1LT3ZbPrbr0i26gOia9RAN6/ZN5NA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)