If you are talking about the password lock, no way. Enter the wrong password until you exceed the maximum allowed attempts, let the device wipe, and start over.
If you are talking about the carrier lock, my advice is contact the seller, plead stupidity and see if they will give you the code again. But perhaps you will have to buy the code again.