device: fixed syncing of lastKey
guard: queue is synced with interrupt disabling in guard