I think with passports there is an element of data entry involved with going abroad (flights, visas/visa waivers, tour bookings, sometimes even accommodation, etc), which will surely flag that your passport is invalid or you become aware that the date is coming up.
All the railway needs to do...