How to update one table based on another table's values on the fly?
UPDATE ips INNER JOIN country
    ON ips.iso = country.iso
SET ips.countryid = country.countryid


Using MySQL update multiple table syntax:

14.2.11 UPDATE Syntax

Note that you have two different lengths and data types on your iso columns.  There are, in fact, two separate sets of ISO codes, 2-letter and 3-letter, so you may not in reality be able to join these columns:

ISO 3166-1

The join condition USING (iso) instead of ON ips.iso = country.iso works too.