For as long as the current tenancy lasts, your friend can continue with the current lower of HICP or 2% increases ie. the €31 you mention. Only a brand new tenancy entered into after March 2026 where your friend's existing tenants left of their own accord qualifies for the uplift to market value.
Assuming your friend has only one rental property, he or she can then increase the rent on the new post March 2026 tenancy annually based on HICP/2%. If the tenants are still in place after 6 years, the rent increases to market value at that point (assuming the politicians don't 'cancel' any large increases that is).