Release mutex when condition wait fails