If the condom did not break, then most likely no - expired condoms are risky to use because they may easily break.
But you need to know that the effectiveness of condoms may depend on the way through which the STI is transmitted. Some STIs are primarily transmitted via skin to skin contact (such as herpes, syphilis and genital warts), and these body parts are obviously not areas covered by the condom. It therefore makes sense that condoms may not be as protective against these STIs as in the case of STIs that are transmitted through contact with infected fluids.