code: func (s *SQLStore) GetExclusiveLock() (bool, error) {
  	s.Lock()
  	defer s.Unlock()
  	if s.closed {
  		return false, nil
  	}
  	if s.dbLock == nil {
  		s.dbLock = &sqlDBLock{
  			id: nuid.Next(),
  			db: s.db,
  		}
  	}
  	if s.dbLock.isOwner {
  		return true, nil
  	}
  	hasLock, id, tick, err := s.acquireDBLock(false)
  	if err != nil {
  		return false, err
  	}
  	if !hasLock {
  		// We did not get the lock. Try to see if the table is updated
  		// after 1 interval. If so, consider the lock "healthy" and just
  		// return that we did not get the lock. If after a configured
  		// number of tries the tick for current owner is not updated,
  		// steal the lock.
  		prevID := id
  		prevTick := tick
  		for i := 0; i < sqlLockLostCount; i++ {
  			time.Sleep(time.Duration(1.5 * float64(sqlLockUpdateInterval)))
  			hasLock, id, tick, err = s.acquireDBLock(false)
  			if hasLock || err != nil || id != prevID || tick != prevTick {
  				return hasLock, err
  			}
  			prevTick = tick
  		}
  		// Try to steal.
  		hasLock, _, _, err = s.acquireDBLock(true)
  	}
  	if hasLock {
  		// Success. Keep track that we own the lock so we can clear
  		// the table on clean shutdown to release the lock immediately.
  		s.dbLock.Lock()
  		s.dbLock.isOwner = true
  		s.wg.Add(1)
  		go s.updateDBLock()
  		s.dbLock.Unlock()
  	}
  	return hasLock, err
  }
docs: // GetExclusiveLock implements the Store interface