Anyone know the best way to keep them from rusting again?
Have to remove the rust first - rust is like cancer, it spreads. A Dremel tool with a steel brush cup works well for large spots, I use a Scotch-brite pad for small. After you grind/scrape the rust off, degrease the metal and cold-blue the bare spots. Wipe the cold-blue with any gun oil.
I spray a rust-preventative on the mags inside and out, then put them in zip-lock bags, suck out the air before sealing. Use a waxy spray, I like Rust-Guardit.
Don't use WD40 (in fact, don't use WD40 around guns for any purpose, it's a water-displacer, not a lubricant or a preservative).
Should keep for a long time.
If you have rust between the welds, such as between the feed lip side plates and the mag body, throw the mags out (or give them to someone you dislike).