1cfede28b7
Add SELECT FOR UPDATE row lock on subscription before checking device limit in all 3 device purchase endpoints (cabinet new, cabinet legacy, miniapp). Without the lock, two concurrent requests both read the old device_limit, both pass validation, and both increment — resulting in device count exceeding max_device_limit (e.g., 5 devices when limit is 3). Also moved max-devices check before balance check in legacy endpoint to fail fast under lock.