Can go to http://account.microsoft.com, then go to Devices, see more info on that specific phone and then from Find My Phone choose to lock it with a new 6-digit pin. It asks you to also enter a message that is supposed to display to the user of the phone,
but haven't seen it appear.
However it does make it find to change the pin like that and change it. That suggestion is really helpful.
I was having the deadlocking situation where right after upgrading to Win10 a Lumia 930 phone from Win8.1update, I gave in a wrong pin and it locked asking me to reboot. At each reboot (even tried resetting with power+vol down for 10sec), it was saying the
same thing again and again. Luckily I had already activated a Microsoft account (was required at Win8.1 in order to download the Windows upgrade advisor app from the store)
For changing the pin the phone needs to have wifi or data (if it doesn't and doesn't allow you to set it without entering a code), try plugging it via USB to a Windows 10 computer first. Else will need to have a SIM and number and be connected (correct SIM
pin entered) to mobile (GSM etc.) network. The lock phone pane at account.microsoft.com does ask you if the phone has a number assigned to it or not