Gutted. Out of interest, what phone is it? I always install a custom recovery on mine, helps in a situation like this.
Edit: just seen that it's a Motorola g4.
Probably have to go through motions of locking it, then entera new password on device manager and then unlock. Then the option to enter the new password is given on the phone. And of course, it depends on whether the device manager is already on the phone itself!