Based on your statement about the "gear that runs in the track" I'm guessing you have the Schwintek slide. As Bob said, WD-40 is not recommended and is actually not a lubricant, but a water displacement compound. Quick dry Silicone spray or Dry Lube with PTFE is preferred.
There are several parts on the Schwintek slides that need lubricant, but not the track itself. Here's a video from Lippert...