SET @count = 0;
UPDATE table_name SET id_column = (@count := @count + 1);
ALTER TABLE table_name AUTO_INCREMENT = 1;
Warning: Only do this if the column is not being used as a foreign key by other tables. Changing primary keys will break historical relational mappings unless you have configured ON UPDATE CASCADE
For deeper configuration details regarding persistent sequences, check out the MariaDB AUTO_INCREMENT Documentation.