offset += response.data.response.items.length;
count = response.data.response.count;
console.log(`offset: ${offset}\ncount: ${count}`);
} while (offset != count);
console.log(`offset: ${offset}\ncount: ${count}`);
при этом не через WHERE
WHERE id = currentId