what unit?
The reason why you the phone cannot accept even the right security code is that you have already entered the wrong code more than the allocated grace tries (around 3-5).
Solution A : Turn on phone. When phone asks for security code, leave it for more than 10 minutes. After which, enter correct security code. Phone should now accept security code.
Solution B : If you can't wait for more than 10 minutes, use an mbus cable and run nokiatool (033/034/035). Read phone. Check UI Settings then click on Apply SFS. There is a possibilty that the software will report a failure to implement the said action, ignore this. Read phone. Security code should now be reset to 12345 and phone will now accept security code. A word of caution though, doing this will cause you to lose your user modifications on your phone (i.e operator logo, top scores, welcome note, etc.)
Regards,
aCe