This returns true or false
$values = have_rows('user_notification', 'user_'.$user_id);
Which means that
while ($values)
is always true
The correct way to do this loop is
if (have_rows('user_notification', 'user_'.$user_id)) {
while (have_rows('user_notification', 'user_'.$user_id)) {
the_row();
}
}