Can I update iOS on a locked phone?
You cannot update iOS on a locked device. When you try to update via iTunes(which is the only possible in this situation), it will ask you to unlock the iPhone. It is simply not possible to update or restore a locked iPhone or any iOS device.