Mining income is taxed as ordinary income at the price on the day and at the time you mine the coins.
Profit/Loss while trading is taxed as a capital gain or loss.
I understand that officially you pay tax over the value at the moment you mined the coins, but does selling them at higher value at some later point require you to once again pay tax?
It could more or less fit in the category of trading/capital gains.
Correct.
First you would pay the tax on your income/profit during mining. In your example you would pay tax on:
[(40.5 BTC) x (the price at the time mined)] - (all expenses of mining including equipment depreciation)
Then when you sold them at a higher price you would need to pay taxes on the capital gains:
(40.5 BTC) x [(price at the time of sale) - (the price at the time you mined them)]