Sim does not work on new iPhone 4..."The SIM card inserted in this iPhone ..."

Hi, This is my story: Yesterday I swapped a broken iPhone 4 for a new one in an Apple store in London. My old iPhone 4 was locked to O2 in Ireland ( it belonged to my Mother in law!). I had my GG sim cut this morning and when I put it in, I get this message "The SIM card inserted in this iPhone does not appear to be supported. Only compatible SIM cards from a supported carrier may be used to activate iPhone. Please insert the SIM card that came with your iPhone or visit a supported carrier store".. I have tried with another sim from Tmobile and got the same message, so it is not a GG issue. The guy in the shop says that it may be locked to the Irish O2 network....? Don't know what to do, is it barred, just locked?, how much does it cost to unlock and where can I do it?Any guru can help me....? Thanks a lot