Well, yeast and mold both belong to the kingdom fungi, so it's a bit difficult to generalise. I have never had yeast get moldy, but eventually the microorganisms die and it smells bad and certainly would not be usable. We buy 42g (for historical reasons) cakes of fresh yeast for about 0.20 € and they keep in the refrigerator for at least 2 weeks. I would not buy a larger amount in any case.
BTW, I did some experiments with freeze dried yeast and am convinced that the bread made with it is virtually identical to the bread made with fresh yeast. I know that this will cause a lot of people to foam at the mouth (C02 from the fermentation), but I am personally convinced of it. It is necessary to awaken the freeze-dried yeast first with a bit of sugar and tepid water and then give it time to reactivate. In my undergraduate years in microbiology I even did a study of this in which I compared CO2 output, active yeast cell count and finally subjective taste testing of baked products. It was not possible to detect an objective or subjective difference if the procedure was followed carefully.
Some bakers have their own yeast cultures which they guard with their lives. I know that they give very different results to the normal fresh yeast from the supermarket and to the standard 7g packets of dried yeast. I tried to get a baker from New York to give me a sample of his yeast for testing, but he wouldn't even consider it. Beer brewers are less protective and you can occasionally get one to give you a sample of his yeast. With some adaptation it can be used for bread making. They're all Saccharomyces cerevisiae, but different strains can be quite different.