Add guard to verify gameId is set before attempting to lock the row it
references.