If your version of mysql is 4.0.14. or higher then you can do it in one query
$sql = "INSERT INTO table(col1,col2,col3,col4,col5) SELECT col1,col2,col3,col4,col5 FROM table WHERE id=$id";
Note that I am not selecting the id column and so have to list all the other columns. You could also just select * and use ON DUPLICATE KEY UPDATE instead.