async def unlock(self, key, value, *, flags=None, session):
        """Unlocks the Key with the given Session.

        Parameters:
            key (str): Key to set
            value (Payload): Value to set, It will be encoded by flags
            session (ObjectID): Session ID
            flags (int): Flags to set with value
        Response:
            bool: ``True`` on success

        The Key will only release the lock if the Session is valid and
        currently has it locked.
        """
        value = encode_value(value, flags)
        session_id = extract_attr(session, keys=["ID"])
        response = await self._write(key, value,
                                     flags=flags,
                                     release=session_id)
        return response.body is True