Hi Iacopo,
I am not sure I understand your question .. you mean literature suggests that the sludge age should not be more than 30 days?
If you calculate 40 days for your set up, you need to lower it by wasting more sludge, increasing the flow, reducing the volume, ... it depends on how your system is set up.