UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'koXKInkuN8C6R6SlI4Gp4Crz66Fg0yLO07vEa+wAgeI='
WHERE
key_id = '8e439597a303fcef35b19b3f970b0d69f698f5e2ce2e0613331dee0122aff6b1'
AND (
token = 'koXKInkuN8C6R6SlI4Gp4Crz66Fg0yLO07vEa+wAgeI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)