Book from 8 pm to 8 am and check in before 0050 hrs . Then will know which train u r arriving in from the pnr you used while booking the retiring room. They wait for 1 hr after the train's arr before disposing off the room to any other request.
But if u use someother pnr to book the room and use the 2345 hrs arriving pnr then it will be aproblem