I got it. I think the hard part in this situation is detect if there's any existing post with the same title. I'm afraid I don't have any that code available.
Once you get that post (with post ID), you can use update_post_meta
function to manually update fields.