UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '62X7UNFX2ArUelRR3H6iVqFXltYIneflVxDd/PYVIvE='
WHERE
key_id = '099675cdd958e0294cc2c7bf8c0fbc155c404b4532a4081feb2cb8626cf884e1'
AND (
token = '62X7UNFX2ArUelRR3H6iVqFXltYIneflVxDd/PYVIvE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)