An inhibit is automatically released when when the process that set it dies.
So for one-shot commands inhibit will be released immediately.
I can't find the spec on Freedesktop.org, but my own tests under KDE and this page tend to confirm that this behavior is the same on most Session Managers / Power Managers.