This is what you should do for sure then,
1. Dispute the ticket
2. Book Class 5 test (find the first available date so book now)
3. Pass test
4. PROFIT
5. Retract the ticket
6. Pay the ticket.
You should be good
Don't worry too much and get all this done first!