the only way is to Had the same problem but after much lamenting, I found a solution that keeps all your data intact and would not require you to do a hard reset. I use a Nokia lumia 830 and I upgraded about two days ago to build 10536 (10.0.10536.1004) if you have set up the FIND MY PHONE function using the WINDOWSPHONE.COM website and your PHONE SETTINGS, you're in luck!. I simply used the lock function on the website to change my lock code to one of my choosing. My windows phone after a few seconds restarted and after booting was complete, I unlocked my phone using the lock code I choose online. That's all!. I don't know why my phone had to restart but I was too happy to care. hope this works for you too even trying this method still phone gets lock again so give us a proper way people are facing this same problem again these days to much pleeezzzz dont disapoint us already we are to much dissapointed :eck::eck::eck::eck::eck::eck::eck::eck::eck::eck::eck::eck::eck: