Mysql 100% CPU everyday at 10 AM UTC for 10 hours (groupfolder query)

I am facing this new issue and I was wondering if other users fixed it.
Nextcloud 21
Groupfolder last version

Everyday at 10AM UTC the CPU of my MariaDB (happened also on Mysql) goes to 100% for ±10 hours. When showing the process list I see a lot of queries like this one:

SELECT `f`.`fileid`,
       `mapping_type`,
       `mapping_id`,
       `mask`,
       `a`.`permissions`,
       `path`
FROM   `oc_filecache` `f`
       LEFT JOIN `oc_group_folders_acl` `a`
              ON `f`.`fileid` = `a`.`fileid`
WHERE  ( `parent` = 5221946 )
       AND ( ( ( `mapping_type` IS NULL )
               AND ( `mapping_id` IS NULL ) )
              OR ( ( `mapping_type` = 'user' )
                   AND ( `mapping_id` = '...' ) )
              OR ( ( `mapping_type` = 'group' )
                   AND ( `mapping_id` = '....' ) )
              OR ( ( `mapping_type` = 'group' )
                   AND ( `mapping_id` = '...' ) )
              OR ( ( `mapping_type` = 'group' )
                   AND ( `mapping_id` = '....' ) )
              OR ( ( `mapping_type` = 'group' )
                   AND ( `mapping_id` = '...' ) ) ) 

I have 1,105,155 entries in oc_filecache & 4,521 in oc_group_folders_acl.
Any idea?

Added some information in an existing issue (might be related):