<?php
$result = run_query("SELECT id FROM `" . $config['table_prefix'] . "tips` WHERE cond_value REGEXP 'if.*UNSUBSCRIBE'");
while ($row = sql_fetch_assoc($result)) {
    run_query("DELETE FROM `" . $config['table_prefix'] . "tips` WHERE id = " . $row['id']);
}