Ideas to improve query performance
A first step in improving the performance of WordPress is to change the "meta" schema as discussed here:

http://mysql.rjweb.org/doc.php/index_cookbook_mysql#speeding_up_wp_postmeta

If that does not help enough, I will take a deeper look at your query.