A local bakery sells three types of pastries: muffins, croissants, and danishes. Last week, they sold a total of 120 pastries. The number of croissants sold was twice the number of muffins sold, and the number of danishes sold was 30 more than the number of muffins sold.
If we let m represent the number of muffins sold, write an equation that represents the situation, and find the number of muffins sold.