kmsrecorderendpoint: Protect sync variables from concurrent access

Change-Id: I8d1c542b93baeaaa0161c84f39c9f4198dddc7e1