Looking at it, the TRENORD (a different rail company) trains are once an hour to MXP, far less often than I expected. However, it is €4 and is a one class (1st class fare). Following through the example above, I would aim for the train (S50) at 13h25, which gives you a bit of margin if the previous one runs late. And you'll have time to buy that €4 from the machine on the platform (remember to validate the tickets by stamping them at the boxes before you get on the train).