This got solved for me when I updated to EE v4.1.1
Had exactly the same error from curl that it was expired.
Before the update
user@server:~$ sudo ee site ssl-renew --all --force
Starting SSL cert renewal
Loading current certificate for mydomain.com
Starting SSL verification.
PHP Fatal error: Uncaught GuzzleHttp\Exception\RequestException: cURL error 60: SSL certificate problem: certificate has expired (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) in phar:///usr/local/bin/ee/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:186
Stack trace:
#0 phar:///usr/local/bin/ee/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(149): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle), Array)
#1 phar:///usr/local/bin/ee/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(102): GuzzleHttp\Handler\CurlFactory::finishError(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory))
#2 phar:///usr/local/bin/ee/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php(43): GuzzleHttp\Handler\CurlFactory::finish(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory))
#3 phar:///usr/local/bin/ee/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(28): Guz in phar:///usr/local/bin/ee/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php on line 186
Warning: An Error occurred. Initiating clean-up.
Warning: Exiting gracefully after rolling back. This may take some time.
Success: Rollback complete. Exiting now.
After the update:
user@server:~$ sudo ee cli update
Note: It is recommended to run EasyEngine update in tmux/screen. Update at times may take some time.
To view progress, tail logs in a different window using `tail -f /opt/easyengine/logs/ee.log`.
You have version 4.0.14. Would you like to update to 4.1.1? [y/n] y
Downloading from https://github.com/EasyEngine/easyengine/releases/download/v4.1.1/easyengine.phar...
md5 hash verified: d4300527b59d0c8d0c4141bafb340e24
Updating EasyEngine to new version. This might take some time.
New version works. Proceeding to replace.
Success: Updated EE to 4.1.1.
user@server:~$ sudo ee site ssl-renew --all --force
Starting SSL cert renewal
Loading current certificate for mydomain.com
Current certificate is alerady expired on 2020-02-17 10:41:09, renewal is necessary.
Enabling site mydomain.com.
Success: Site mydomain.com enabled.