Insert or update session row.