If some code is not needed, then it should be removed, not commented.
However, I am not sure if this is a proper fix. I am not familiar with the module and its code, so I may be wrong, but feels like removing a callback that removing a callback for cleanup state is somehow not right. Maybe it should be investigated why changing purge_expired_interval has no effect.
@linuxmaniac - do you have any comment here?