I strongly suggest to throw all moldy beans right away. Not for health reasons but for consistent and hight quality flavor. When mold attacked a nicely fermented beans, the nice acidic aroma (nice for me) is being replaced by an awful moldy smell. Sometimes it is only superficial, affecting only the shell and the cotyledon.
Aflatoxins? All beans has it basically. The most loved coffee has its won version called the ochratoxin. There is still a risk of aflatoxin formation on badly stored cacao. However, according to various studies, the amount is too small to cause human danger. Sorry my dear! For now, I am too lazy finding those scientific articles and post it here for your lovely eyes and hungry brain. Some other time maybe.
There are three things to consider. Just in case you are on a tight budget. Cacao beans are in shortage nowadays (in my hometown, Philippines). Salvaging some may work for you. Please keep in mind that there is a high risk of losing valuable customers with this method. Do it at your own risk!
1) Slight mold on surface are still fine. Put them in separate container. Dry under the sun or other convenient drying method.
2) Half covered with mold? This is a fifty/fifty scenario. Put them in separate container. Dry. Then sniff it one by one. Acidic smelling beans are still okay, throw it otherwise.
3) Fully covered with mold? This is a no no. Moldy nibs, no matter how expertly you roast it will still be moldy, moldy taste and moldy flavor. Take it from me, I tried experimenting with it several times.
If you are a chocolate connoisseur and you feel your customer’s taste buds are on the same level as yours. Then, discard this risky method and stick to high quality beans input. Buy only good fermented beans with no molds, and handle and store them properly to prevent occurrences.