Is it best to take my new iPhone 5s back to an Apple Store or to O2?

Today I purchased my brand new iPhone 5s and have noticed a rattle which should not be there. It is from the Lock Button, and I have heard this is a common fault?

Should I take it straight back to an Apple store, or to O2 where I purchased it from for a free replacement?

If I was to take it back to Apple, would I need to wipe the phone first and if they provide me with a new one, will it simply mean placing my O2 sim card back in and restoring from back up?

Your contract is with O2. If they have supplied you with a defective item it is their responsibility to put it right. The putting it right must leave you in the same position as you were before, including copying over any files stored on the previous phone. They will do this by backing it up and putting the SIM card in the new phone.