If someone having, "System lock" issues,
https://shanerutter.co.uk/how-deleted-530-million-records-mysql-database-table/this article
This article will give you better performance.:
BEGIN
DECLARE incrementValue INT DEFAULT 10000;
DECLARE curMaxId BIGINT DEFAULT 10000;
DECLARE maxIdx BIGINT DEFAULT 530000000;
WHILE curMaxId <= maxIdx DO
DELETE FROM table WHERE id < curMaxId;
SET curMaxId = curMaxId + incrementValue;
END WHILE;
END```
CREATE PROCEDURE DeleteLargeData()
BEGIN
DECLARE incrementValue INT DEFAULT 10000;
DECLARE curMaxId BIGINT DEFAULT 10000;
DECLARE maxIdx BIGINT DEFAULT 530000000;
WHILE curMaxId <= maxIdx DO
DELETE FROM table WHERE id < curMaxId;
SET curMaxId = curMaxId + incrementValue;
END WHILE;
END