RDBMS-specific functions are not available through ActiveRecord. With the current implementation it’d be hard to configure it this way as well.
I think your solution is semantic, readable and secure. If you, however, really want to use AR, the only path I can see is to check row existence (CActiveRecord::exist()) and insert or update accordingly.