Trains to and from Toledo do sometimes sell out. Rick specifically warns about late-day return trips to Madrid. Because of the soccer match, I'd recommend buying the return ticket in advance. I think you often save a bit in Spain by buying round-trip tickets, so if you are comfortable with picking the return when you head out, that's what I would do. I wouldn't expect there to be a problem leaving for Toledo around noon on a Thursday, and it's really impossible to predict what would be a safe time to book.
If something goes seriously awry, buses are options as well, but they take longer and do not depart from Atocha Station.
Note that the train to Toledo is not an AVE, which is a good thing, because it keeps the fare reasonable and means you will not be paying a lot of extra money for your last-minute ticket. Toledo is on a spur line, not the main line carrying AVEs south to Seville.
Edited to add: I think you can buy your ticket at the airport rail station, which would be a very good thing to do, since Atocha is a confusing place and lines at staffed counters could slow you down.