When should one use comma after a location?

I understand that it’s required to place comma after a location as in,

“The guy from Texas, USA, is really brilliant”.

But what would you when you have restrictive clause or in a sentence where you can’t use comma as in,

“I participated in the contest, SPL 2013, India [,] and won first prize”

“I was a part of team from Oxford University, UK [,] that won the first prize in the contest”

?
Thanks.

Your first sentence should be:
“I participated in the SPL 2013 contest in India[,] and won first prize.”

The second sentence is not grammatically correct :
“I was part of the team from Oxford University in the UK that won the first prize in the contest”

If you leave out in(the) in both sentences, you need two commas because you have added additional non-essential information. In fact, you would be better off changing the word order in the first.

“I participated in the SPL Contest, India 2013, and won first prize.”
“I was part of the team from Oxford University, UK, that won the first prize in the contest”