If you happen to be in Connaught Place there is another place you can buy a tourist quota ticket, in the Delhi Tourism Corporation Office (phone 331-3637) located at N36, middle circle of Connaught Place. The opening hours are the same as the one at the railway station. You have to show your passport and pay in US Dollars or UK Pounds if you do not have an encashment receipt for your rupees. Change is given in rupees.
There are some unscrupulous travel agents across the road from the railway station who may approach you in front of the station or inside to persuade you to come to their shop by telling you that the Tourist Booking Office is closed or caught fire. They are big cheaters. Ignore them. You can book a tourist quota seat or seats on a train going to Mathura up until four hours before departure. After that time, the seats are released, and there is a place out in the front of the station called "Current Reservations" (it looks like an ice-cream stand) where you can book a sleeper-class ticket within two hours of the time of departure. It is advantageous to buy the ticket at current reservations as it entitles you to wait in the second class sleeper waiting room, which is much more pleasant than waiting on the platform. There are almost always sleeper seats available to Mathura, because passengers will be boarding the train at Agra (home of the Taj Mahal), which is the next major station after Mathura Junction. If you are paying in rupees, you can also go to the computerised booking office on Chelmsford road. It is a very large hall with many booking windows. As you approach the booking office a booth outside on your right where you must obtain a booking form. Fill in the form and present it and pay at any of the booking windows. This office was almost deserted when I was last there, but can be very busy. It is airconditioned. Bookings made any regular computerised booking office do not have access to the tourist quota, which may be a problem if you are trying to book a ticket on a popular train at a peak-period. I've never used this service, but it is also possible to book your ticket on the internet, pay by credit card, and collect it at the Chelmsford road computerised booking office. The window for collecting the tickets is on the far right inside the booking office. This service is only available at this location. Inside India the tickets can be booked on the internet and sent by post, a maximum of six tickets on any train, and a maximum of four booking per month. If you have a second sitting ticket and want to upgrade, it is wise to speak to the TTE (Traveling Ticket Examiner) on the platform before boarding the train. They wear a dark suit with a distinctive Indian Railways red necktie with a Gold "IR" in a circle emblazoned on it. They can be seen scurrying around with a computer printout in their hand. They will indicate which coach you should board and may assign you a seat on the spot. They will come around and collect the difference in fare some time after the train departs. If you already have a sleeper class ticket they will come and look at it some time during the journey. Inside the station, you can only buy a second class unreserved ticket Rs 43 to Rs 57 (and upgrade to a sleeper ticket on the train for an additional Rs 85) but you may have to wait in a big line (queue) of impatient and pushy Indians to do it. This will certainly prove interesting, but you'd be better off getting a SLEEPER ticket (Rs. 142) either upstairs at the Tourist Booking Office or out front at "Current Reservations". Second class unreserved is a wooden park bench in a cattle car. Usually there is nowhere to sit and nowhere to put your bags, so it's much more comfortable with the sleeper car, a guaranteed seat and there will be a place to put your bags either under your seat or up above opposite you (where you can see them) in the upper berth.