def expire_one_memo(self) -> None:
    k = None
    if ((self.expire_order is not None) and (len(self.expire_order) > 0) and (self.memos[next(iter(self.expire_order))].t0 < (time() - self.duration.total_seconds()))):
        (k, _) = self.expire_order.popitem(last=False)
        self.memos.pop(k)
    elif ((self.size is not None) and (self.size < len(self.memos))):
        (k, _) = self.memos.popitem(last=False)
    if ((self.db is not None) and (k is not None)):
        self.db.execute(f"DELETE FROM `{self.table_name}` WHERE k = '{k}'")
def expire_one_memo(self) -> None:
    k = None
    if ((self.expire_order is not None) and (len(self.expire_order) > 0) and (self.memos[next(iter(self.expire_order))].t0 < (time() - self.duration.total_seconds()))):
        (k, _) = self.expire_order.popitem(last=False)
        self.memos.pop(k)
    elif ((self.size is not None) and (self.size < len(self.memos))):
        (k, _) = self.memos.popitem(last=False)
    if ((self.db is not None) and (k is not None)):
        self.db.execute(f"DELETE FROM `{self.table_name}` WHERE k = '{k}'")