Before carrying out this procedure, disconnect from the Internet. That means turning off Wi-Fi and disconnecting from a wired connection. If you don't, Windows 10 will indicate some files are in use and cannot be modified or the command will be non-responsive.
Also, you should restart your computer after disconnecting from the Internet. The easiest way to do it is to enable Airplane mode from the Action Center - Windows key + A.
Open Start, type: CMD
Right click CMD
Click Run as administrator
Type each of the following then hit Enter
taskkill /f /fi "SERVICES eq wuauserv" (do this multiple times)
net stop cryptSvc
net stop bits
net stop msiserver
ren C:\Windows\SoftwareDistribution SoftwareDistribution.old
rmdir C:\Windows\SoftwareDistribution\DataStore
rmdir C:\Windows\SoftwareDistribution\Download
When complete, hit Enter, then restart, then try updating again.
If that does not work...
Open Start, type: CMD
Right click CMD
Click Run as administrator
Type each of the following then hit Enter
Net Stop bits
Net Stop wuauserv
Net Stop appidsvc
Net Stop cryptsvc
Ren %systemroot%\SoftwareDistribution SoftwareDistribution.bak
Ren %systemroot%\system32\catroot2 catroot2.bak
Net Start bits
Net Start wuauserv
Net Start appidsvc
Net Start cryptsvc
After running these commands, check if your issue is fixed.
Try this additional tips to see if they work:
Troubleshoot Windows Update Problems in Windows 10 Using These Five Tips
https://windows10.help/blogs/entry/23-troubleshoot-windows-update-problems-in-windows-10-using-these-five-tips/