Lock license key row when selecting license keys for update.

There are instances where two processes in parallel can try to get the same license keys. By locking the rows when selecting, we should be able to avoid this.