The simplest and most commonly used method is:
1. Completely soak in alcohol (this is necessary to restore dryness and smell).
2. Press it firmly with gypsum board or porcelain.
3. It will dry quickly (alcohol evaporation will not leave moisture) and be as flat as new, without moth and mildew.
The best way to prevent it from getting moldy again is not to put it in a place that is easy to get wet. This is the basic common sense of keeping books.