Can an STD cause a miscarriage?

Gabriela • First time mom. 23. Due 06.26.17
I'm so worried of having a miscarriage, because I might have an std. I feel really itchy down there and it hurts sometimes when I pee. The doctor yesterday tested for any STD including UTI. Hopefully I'll get my results on Monday. I'm just so scared I'll miscarriage because of this. Would I miscarriage so soon, or do I have time to cure it.
Please help out