wp_update_post using post_name

$post = get_page_by_path( 'the_slug', OBJECT, 'post_type' ) ;
$id = $post->ID;

Then you an update post using this ID.
Note: Untested, may contain syntax error.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)