def METHOD_NAME(self, session):
    payload = json.dumps(dict(session))
    self._cr.execute(
        """
            INSERT INTO http_sessions(sid, write_date, payload)
                VALUES (%(sid)s, now() at time zone 'UTC', %(payload)s)
            ON CONFLICT (sid)
            DO UPDATE SET payload = %(payload)s,
                          write_date = now() at time zone 'UTC'
        """,
        dict(sid=session.sid, payload=payload),
    )