<?php
$q = mysql_query("SELECT * FROM `baff`");
While($w = mysql_fetch_assoc($q)){
    if($w['time']<=time()){
        mysql_query("UPDATE `users` SET `min_u`=`min_u`-'$w[uron]',`max_u`=`max_u`-'$w[uron]',`hpall`=`hpall`-'$w[hp]' WHERE `id`='$w[user]'");
        mysql_query("DELETE FROM `baff` WHERE `id`='$w[id]' and `user`='$w[user]'");
    }   
}
?>