MySQL - Update if one of the values exist, else insert
===

How can I at an insert query, check if a specific column has a specific value and then update the row. Otherwise it should insert a new row.

Somethings like this is what I want:

    INSERT INTO table (col1, col2, col3) VALUES (val1, val2, val3) UPDATE IF col3 = $number

