http://dev.mysql.com/doc/refman/5.0/en/replace.htmlhttp://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.htmlMysql has "replace into <table> values <vals>" (which actually does delete then insert) or there's "insert ... on duplicate key update". Both of these are extensions to the sql standard which makes them interesting but not useful if your code needs to run everywhere that Joomla does (as Joomla now supports DBs other than MySQL).
If you need portability, I'd suggest either creating a stored procedure to do the check-insert/update, or modifying the db interface classes in Joomla by adding a "updateOrInsert" function that uses mysqls extensions there, and in the other(s) tries to select then runs an appropriate update / insert query*, or extending the JTable structure to make this work for your one or two tables . It really depends what scope you want this functionality and how in-depth you want to get.
:-Dave
* This idea not fully thought through, may be riddled with problems.