Originally Posted by
androidtt
My first time out I rode at an incredible 9mph with a max of around 11mph. For 3 miles. Came back and sat down on soft stuff all day.

I was the same - my first ride was 5 miles, and I "hammered" it at a blazing 14mph ... and then collapsed, and could hardly walk for 2 days!
To the OP - 40km may be too far for your first ride. I would suggest a shorter distance, and definitely, a slow speed. Build up speed and distance slowly, and you might be amazed by how fast you get to 100km rides at 18mph - and better.