title: When does "select for update" lock and unlock?
body: <p>Here is my Pseudo-code：</p>
  
  <pre><code>re = [select **result** from table where **condition**=key for update]
  
  if[re satisfies]
  {
      delete from table where **condition** = key;
  }
  
  commit
  </code></pre>
  
  <p>I want to ask if the row with condition equals to "key" has already been deleted, Can the lock  blocked by the "select for update" be unlocked automatically, which means if another process enters at this point and select for the same "key" it can not be blocked by this one ? </p>