AND `t2`.`id` > `t1`.`id`
или AND `t2`.`id` < `t1`.`id`
DELETE `t1`.*
FROM `contacts` AS `t1`
JOIN `contacts` AS `t2`
ON `t2`.`user` = `t1`.`user`
AND `t2`.`ho` = `t1`.`ho`
AND `t2`.`id` = `t1`.`id`
DELETE `t1`.*
FROM `contacts` AS `t1`
JOIN `contacts` AS `t2`
ON `t2`.`user` = `t1`.`user`
AND `t2`.`ho` = `t1`.`ho`
AND `t2`.`time` > `t1`.`time`
ALTER TABLE `contacts`
ADD UNIQUE KEY `uk_user_ho` (`user`, `ho`);
SHOW CREATE TABLE `contacts`