Fixed up locking in sustainer processing from the drupal queue

Added some checking to the query before processing a sustainer and fixed the last query to update the lock_id correctly