I have commuted 1 to 1:15 hours one way to school, and later on 1 to 1:30 hours to university (depending on traffic, train schedule, etc.). If the train connections are not too inconvenient, you should be able to work during your commute.
It worked perfectly for me. Although it may feel rather stupid to commute for 2-3 hours to attend 1 or 2 hours of lectures on a day. I always studied at home, apart from group work. There were no resources I needed and could not access at home.
The one consideration, IMO, is whether there are others commuting. If very few people commute, you may have a harder time fitting in socially. In my university, there was always a majority of people commuting, which made it an easy decision. Not sure how important that is to you, though, as a mature student.