Using any music that you do not have the right to use is a technical copyright violation except where specific “fair use” is in play - and even then, that wont prevent Youtube from flagging it.
If the music is in the YouTube ContentID system it will be flagged whether it’s 5 minutes long or 2 seconds long.. just because it’s less than 30 seconds does not make it ‘fair use’.. and again, even if it did, that wont prevent it from being flagged. It’s a whole ‘nuther ball of nuts to prove to Youtube and the copyright owner that it’s actually fair use..