How would I go about combining these commands to update a record if it already exists, or insert it if it doesn't?