I believe 23 weeks is way too early to feel braxton hicks contractions. I would have put it down as gas pains. If you were keeling over with pain, and it was the baby, then I think you would have started bleeding, lost the baby, or at least be hospitalized pretty soon after you started feeling that way.
You did the right thing tho. When something just doesn't feel right, it's better to be safe than sorry. As for keeping this from happening again, you might want to remember what you ate that day or the day before so that you know to avoid that in the future if it was the thing that you ate. Or it could have just been some bug you picked up.
Since everything is kind of in the same place and things get a little smushed from your expanding uterus, it is hard to know what exactly is going on, especially if you've never had labor pains before. Don't ever feel silly and feel free to post again if you ever have questions

I'm glad you are ok.