Can mutation take place in G1 and G2 phases during the cell cycle?
Yes, it can. A mutation can potentially occur at any given moment in the cell cycle, not only in S phase, which is why revision mechanisms remain alert during the whole cycle. Such mechanisms not only make sure every important event in the cycle takes place adequately (e.g. DNA replication, chromosome segregation) but also repair any damage associated with DNA (e.g. AP sites, single strand breaks, double strand breaks, to name a few). Once DNA damage takes place, specialized sensors detect such events and activate several mechanisms. One of these will pause the progression of the cell in the cell cycle, and another will repair the DNA-associated damage, in case that it can actually be repaired [1].

[1] Karp, G. (2009). Molecular and Cellular Biology: Methods and Concepts. Wiley. New York.