Background: I want to quit my job and leave to another company and I haven't told my current company anything yet. Everything at the new company is locked in, but the start time is flexible and they are aware of my situation. So I have leeway to postpone quitting for up to 4 months without fear of losing the new job. However for reasons I won't go into, I'm unhappy with my current job and would prefer to leave ASAP. Although, I will say that I have a great relationship with my boss/coworkers and am not worried that quitting will "burn bridges".
Problem: The issue is that I recently found out that my current company is significantly raising my salary and making the pay bump retroactive to the the end of last year. This means I get the difference between my old salary and the new one as a lump sum payment sometime this month (no actual date specified yet). It's a decent chunk money that I could really use.
Question: If I put in my 2 week notice before the money is actually in my bank account, will I lose that payment? Especially for those who have been in similar situations, are there any other nuances I'm overlooking here?
Edit: Based on the downvotes it looks like this was a bad question. Just putting this edit here for anyone seeking answers to a similar question. It seems like the consensus is that I definitely can't quit before payment and expect to receive anything. Additionally, even waiting to quit until after receiving it might be unethical and make people upset. Based on that, the options are to either quit beforehand or stick around for some time afterwards so as not to take advantage.