I hope you realise by now that you cannot move the Lightroom library from the default location....if you do, it will simply create a new one in the default location and will slowly start to populate it from the cloud.
Before doing anything else, login into your cloud account in a browser (go to lightroom.adobe.com) to verify that your cloud contents are still intact, i.e. make sure the All Photos figure shows the 40k total that you are expecting. If it does, I'd suggest you delete whatever version of the local library that's currently in the default location, then start Lightroom and it will create a new local library. Check the Preferences>Local Storage tab to make sure the option to store a copy of all originals locally is NOT checked (otherwise Lightroom will need to download all 40K original files, which would take a while), then just wait while Lightroom rebuilds that local library (it will need to download all the various previews and the copy of the catalog). It will still take a little while but you should see the All Photos number gradually increase until the 40K total has been reached. After that, set your preferences for local storage as you need them.