i have some long running checks i use a different approach, the long running process is called by a cronjob, and only the output is evaluated by the nagios plugin. this way there’s no need to be worrried about the nagios and plugin timeouts.
Not sure if this helps you but it’s a solution.