Condom protects from HIV and other STD's as long as it remains intact. However, once it fails, the risk is equal to that of an unprotected sex. It is therefore important to use condoms, your core line of defence, correctly to avoid failures.
You were expose to the risk, so get yourself tested after 6 weeks of the exposure and a follow up test after another 6 weeks to get your status conclusively
Broken condom means you might've been exposed to HIV risk so you should get tested at 3 months post-exposure for a conclusive result on your HIV status.
About other STDs pls consult at another forum because this forum is only concerned with HIV risk.