Having had a closer look at some S class fares, they will probably allow cancellation with payment of a fee. So if you really want to change to M class, you can get a refund of your ticket, less the cancellation fee, and then buy a new M class ticket.