So you felt the condom break, and immediately pulled out? If that's true, there is some risk, but it's pretty low.
You can test for gonorrhea, chlamydia and NGU at about 5 days.
You can test for HIV with a DUO test at 28 days. You can test for syphilis at 6 weeks, and herpes at 12 weeks.
Your chances for all of them are quite low. Syphilis is uncommon in most developed countries (the US, UK, Europe, Canada, etc.), and most people don't have HIV. Your exposure sounds very brief, which helps.
Herpes symptoms usually appear within 2-12 days. You can get a type specific IgG blood test at 12 weeks, but some places, like the UK and Canada, don't offer these as easily as the US does. Since your exposure was so brief, if you have a hard time getting a test, if you don't have symptoms, I wouldn't worry.