UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'nJN3xYnGPLRJaxmEq+C5AspquB/GQWpHtCYfwrJdN6M=' 
WHERE 
  key_id = 'f7be6c5008990da7e66723d154ab60e33d5dcea70ae877e7d3cd5de30608b2fb' 
  AND (
    token = 'nJN3xYnGPLRJaxmEq+C5AspquB/GQWpHtCYfwrJdN6M=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019