Nokia Lumia 520 - My Lumia stays at the spinning gears

Important: This erases all personal content on your phone and restores the factory settings.

a. Disconnect the charger. Press and hold the Power and Volume Down keys simultaneously. Release the pressed keys when phone vibrates.

b. Immediately when the phone vibrates (or if the phone is powered off, switch it on) then press and hold the volume down key until the phone displays an exclamation mark (!) on the screen. Release the volume down key.

c. Then press the volume and power keys in the following order: volume up, volume down, power, and volume down.

d. Wait for your phone to reset, during the reset you will see gears rotating on the screen for up to 5 minutes, after which the screen goes blank for ~30 seconds and then your phone will restart.

e. Go through the initial phone setup. If the date and time are shown, ensure the values are correct.