If the smell is strong, and especially if you see mold or whitish powder anywhere on the wood, definitely do not smoke it. The musty odor was almost certainly caused by mold or yeast, both of which can make musty odors even when microscopic. It is also possible that the basement or other storage area was musty, and the porous wood simply absorbed the odor. While smoking it will definitely raise the temperature and thus the volatility of the chemicals causing the odor, and this process will eventually pull all the volatiles out of the wood, you will be taking those volatiles into your mouth with the smoke, and some of those volatiles could be way worse than just about anything you'd find in tobacco smoke (I know, sounds crazy, but true). Anyway, alcohol should dissolve most of them, and will definitely kill any mold or yeast that might be making them. I'd recommend skipping the kosher salt and using cotton wool the way Charles Lemon at Dadspipes.com does it. Let the pipe get good and dry for a day or two afterward and then give it another whiff. Repeat as necessary.
The sun treatment and simple waiting will work too, but they'll probably take a lot longer. In theory, if you can smell a material, it is evaporating into the air, and eventually the smell will dissipate on its own that way. But the chemicals causing musty odors are detectable by our noses at very low concentrations (likely because they indicate spoilage) and that means they may not be super volatile, which means they could take a very long time to get to non-detectable concentrations.