probably because you are counting the rows returned with:
if (mysql_num_rows($query) == 1) {
so that will only be true if 1 - and only 1- row is returned
I'm guessing you want to do this
if (mysql_num_rows($query)) {
which will be true if it finds any rows - they will then all be updated
I don't think you need the select either - you could do the update straight off, as if there are no rows found it won't update any..