HPCC-10547 Ensure that the lock is released (when contended) for atleast 5s

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>