First and foremost, contact the manufacturer, i.e. the firm Nokia in order to provide all the information on codeum for reset settings and codeand reset the firmware, and codefor unlock. In this case, all depends on how you will be able to convince the manufacturer that the phone really belongs to you. Prepare the documents confirming the fact of sale and a receipt.
After you get these codes, enter them on the keyboard depending on what you want to do is erase all personal information and return to factory settings, just knock the settings or remove the blocking code of your phone.
In case you do not succeed, reboot the phone. For this you need a data cable with which you will have to connect the phone to the computer. Then re-flash the phone using special software and firmware that you download from the Internet. After flashing you will get a completely clean phone with factory default configuration settings and removed the locking codeom.