Issue in url update when using wordpress update query

Try using $wpdb->replace(); method. It updates a row if it exists and inserts a new one if it doesn’t. See the documentation. Is that what you are looking for?

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