What you are describing is a child pays for parent (CPFP) transaction. By paying higher fee for a second transaction spending the unconfirmed output of the first transaction, you can use it to effectively bump the fee of the first transaction, meaning both transactions will be included in a block together. However, you need to take in to account the respective sizes of the transactions.
Your first transaction with 40 inputs and 1 output will be somewhere in the range of 4,000-6,000 vbytes (depending on legacy or segwit and assuming no multi-sig or other large scripts). Let's call it 5,000 vbytes for ease of the calculations. If you pay 35,000 sats for this, then you will be paying 7 sats/vbyte.
Your second transaction with 1 input and 1 output will be somewhere in the range of 200 vbytes. If you pay 107 sats/vbyte for this, then you will pay a total of 21,400 sats.
If you combine both your transactions, then you are looking at a size of 5,200 vbytes, paying a total fee of 56,400 sats, which works out at a combined effective fee rate of 10.8 sats/vbyte.
So although your second transaction would indeed boost the fee of the first one, it will only boost it by a small amount (from 7 to 10.8 sats/vbtye) since the first transaction is so much larger than the second. If you wanted to boost the first transaction significant, you would have to pay a very high fee for the second transaction. Alternatively, if you aren't in a hurry, wait until the mempool empties and then consolidate at 1 sat/vbyte.