Update same table using dynamic query in drupal 7 HiAll,

I want to execute below sql query using Drupal 7 PDO, But could not find a way to do,

SQL:

"UPDATE  `books`  AS a 
  JOIN  `books` b  ON a.pid = b.pid    
  SET  a. `status` = 'INACTIVE'   
  WHERE   b.`pdays` * (36400) + b.`ptime_from` &gt; 6546"


Drupal 7:

 $query = db_update('books','pb');  
    $query-&gt;fields($update_values);   
    $query-&gt;join('books', 'pc', 'pc.pid = pb.pid');
    //$query-&gt;condition("pc.pdays" * (36400) + "pc.ptime_from",$today ,'&gt;');
   /* $query-&gt;expression('pc.pdays', 'pdays * :daytime + pc.ptime_from', array(':daytime' =&gt; '36400'),'&gt;')*/
    $isbn_reds = $query-&gt;execute(); 


How can we write above SQL in D7 PDO?
To execute clauses like that you would use a where funtion. so your code would be something like

$query = db_update('books','pb');
$query-&gt;fields($update_values);
$query-&gt;where("b.pdays * (36400) + b.ptime_from &gt; 6546");
$isbn_reds = $query-&gt;execute();