I had the same problem. First of all, check if any firewall blocks requests from App Store app. Then open the Console/Konsole app and follow the steps that are described in one of answers above to check if the update is really stuck in one of the steps. If the update of Xcode really stucks, first restart your macOS and than open the App Store app again and also watch out the logs in the Console/Konsole app. If this does not help after several minutes, then restart the App Store app again. This helped in my case. Hope that helps you too :)