Update multiple rows (with different ids and different values) using one query
You can use below example to update:

    $items = array(1,2);
    db_update('your_table')-&gt;fields(array(
      'update_field_one' =&gt; $to_update_one,
      'update_field_two' =&gt; $to_update_two,
      'updated' =&gt; REQUEST_TIME,
    ))-&gt;condition('id', $items, 'IN')-&gt;execute();