1. Take the leaky magazine, and ensure it's empty of propellant.
2. Depress the top fill valve and spray WD-40 inside the rubber seal that feeds to tank inside. Give a generous amount, you want to be able to liberally coat the inside walls of the tank.
3. Shake the magazine vigoriously, and then set it in various positions (typically baseplate down) as gravity will help feed lubricant to the portions of the baseplate that are dry.
4. Let the magazine sit for 5-10 minutes, and then give it a SMALL pressure charge (giving it too much could prematurely blow out swelling seals).
You may find it does not leak at this time. Now, discard this magazine for an additional 5-10 minutes. Then give it a gas charge and it should not leak. Now expel 2-3 magazines worth of a gas charge (half a full charge, shaken to capture excess oil) out of the magazine, and give it a small charge for long-term storage.
If it does leak at this point, expel the small gas charge, and let the magazine sit for an additional 5-10 minutes. Check again and see if the leak is gone. Then, again, following the above steps, clear excess oil from the magazine and prepare for storage, or repeat treatment, but disassembly and inspection of mag is likely the best option.
I just did this last night on my mags and fixed two leaks in 10 minutes. if only I'd known that trick when I used to airsoft more! A 10 year old HFC M9 magazine, and a 5 year old KWA MAC11 magazine. Both leaked from the baseplate seals, and I know from expierence those typically require more work than a quick spray of lube to fix.
I use wd40 on a regular basis to maintain seals on my gas guns and have seen no problems, it merely seems more effective at swelling seals to stop leakage as these seals tend to dry out quite quickly with usage. I believe that silicon oil is far less effective in being able to seep and penetrate into deeply contained seals. I like use silicon oil to treat non-leaky seals, whereas I use WD-40 for magazines that are leaky or have particularly old/compressed seals, but I really use whatever is closest. That being said, I do not recommend wd40 for use inside airsoft guns, as it's not a very good lubricant for most airsoft purposes.