UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2RVbpaZDLsn/BvZWlSzUopqnwoQfZKGKvOWPJP5mRqw='
WHERE
key_id = '98be915976a9f0d8a82be6d31c96be3d26aa1032c09fb146d06d740f3a96ef99'
AND (
token = '2RVbpaZDLsn/BvZWlSzUopqnwoQfZKGKvOWPJP5mRqw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)