I would suggest extracting the additional costs and 40% as equity. Then you have a 60% loan-to-value ratio with very good interest rates. Then roughly a loan amount of 350k€ would be possible. And then a full repayment over the desired term - there is no risk of interest rate increases. So you would need to withdraw around 330k€ and 70k€ could continue to work on the stock market.