Python distributed lock with mongodb backend