Another option is to go to Albert Heijn supermarket at Schiphol plaza (not to be mistaken for AH TO GO). It's located across the Burger King, next to rhe airplanes shop..
You'll find everything you need for your train ride there including drinks, pastries and fresh sandwiches.