By using tryLock with a timeout. Frame the concept in practical terms so you can explain it during interview discussion.
ReentrantLock's tryLock(timeout) method allows a thread to attempt to acquire a lock for a specified period. If it fails, the thread can proceed with alternative logic, avoiding a deadlock situation. In a flash sale, this can mean trying to lock inventory for a certain period, and if it fails, moving to a waitlist logic instead.