Download "Windows Phone Recovery Tool" application for PC, connect your phone with a USB cable to the PC. And update the phone firmware and OS trough "Windows Phone Recovery Tool" aplication.
go.microsoft.com/fwlink/?LinkID=525569
If your phone is not automatically detected, disconnect all phones from your computer and press "My phone was not detected" at the bottom of the main screen. If prompted, select the phone manufacturer. Connect your phone to your computer with a compatible USB cable.
Wait for your computer to detect the connected phone and follow the screen instructions. If the phone is not connected within one minute you can try to restart your phone: Keep USB connected, press and hold the Power and Volume down keys simultaneously. Release the pressed keys when phone vibrates. Press Install software to start installing the software to your phone.