The long time needed seems to be due the "AND p.post_approved = 1" part of the query.
It seems to me this filter should only be present in the query if topic is in a forum requiring messages to be approved. I don't have any forum requiring it (maybe I made a little confusion with permissions).
So, to solve, I manually changed viewtopic.php to don't "append " "AND p.post_approved = 1" to queries and this solved problem. Because I'm sure I'll never use this feature.
Long running queries are now executed in no more than 1 second (and not 400
The same applies to "AND t.topic_approved = 1" and viewforum.php.