Your work is worth 40 EUR / hour if that is how your client sees it. They might not see it like that. They might think (if I get this done it is worth 10000EUR to me, and I trust "yscodes", and so I would definitely pay that much to get this done.
Don't give a friendship discount. That makes no sense (why not give a friendship increase, then they are being a nice friend to you).
A friendship discount is probably applicable if say they are destitute and they need your help moving into another place and can't afford to hire someone. But for normal business I don't get it.
A friendship discount might be applicable if you are selling a high margin good.
But if working for 40/h - that is pretty low already so no need to discount further.
When I say low, this is objective: 40/h freelancing is like 20/h full time, which is similar to what a cafe barista would be paid in Australia.
With the discount, you are getting close to McDonalds basic pay for an adult.