code: def prolong(self):
  		
  		
  		D = self.__class__
  		collection = self.get_collection()
  		identity = self.Lock()
  		
  		query = D.id == self
  		query &= D.lock.instance == identity.instance
  		query &= D.lock.time >= (identity.time - identity.__period__)
  		
  		previous = collection.find_one_and_update(query, {'$set': {~D.lock.time: identity.time}}, {~D.lock: True})
  		
  		if previous is None:
  			lock = getattr(self.find_one(self, projection={~D.lock: True}), 'lock', None)
  			
  			if lock and lock.expires <= identity.time:
  				lock.expired(self)
  			
  			raise self.Locked("Unable to prolong lock.", lock)
  		
  		identity.prolonged(self)
  		
  		return identity
docs: Prolong the working duration of an already held lock.
  		
  		Attempting to prolong a lock not already owned will result in a Locked exception.