"I was worried thinking...." - this is in the past.
"going to happen....the next time" - this refers to the future.
When a sentence contains two parts, and each of them are in different tenses, it is often very confusing to which tense should we add the main verb. In this context, you were worried about something that has not happened yet. So the main focus is for the event that may occur in the future. So the correct (In my opinion) version of the sentence would be :
"I was worried thinking what was going to happen when we meet the next time."
This is a very tricky situation. And many people may disagree with my opinion. But I replaced "the next time" with tomorrow and rephrased the sentence as :
"I was worried thinking what was going to happen when we meet tomorrow."
"I was worried thinking what was going to happen when we met tomorrow."
sounds a bit odd.