UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FF/yYV/6pOZ3hs0wMr2rRy4WQe7we79Bu85kBtTRqHA='
WHERE
key_id = '6e1ccb671a0cf672d374f1b5c67bcb7e4fdc9355d18a05ec2547486758a1c307'
AND (
token = 'FF/yYV/6pOZ3hs0wMr2rRy4WQe7we79Bu85kBtTRqHA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)