what if the timelock is in the past? I just started learning about bitcoin scripting and wonder:

what if the timelock in CLTV is in the past?
what if the timelock in nLocktime is equal to 500.000?
If the nLockTime is less than or equal to the next block height, it can be included in the next block.
To explicitly answer your questions:

The CLTV op restricts the nLockTime field of the spending transaction, therefore if it is set in the past the condition is already fulfilled.
If the nLockTime field of a transaction is set to 500 000 it is valid to be included in any block which height is superior or equal to 500 000.
This basically means any block right now if there is no block chain reorganization deeper than 160 000 blocks :).

This mechanism was cleverly used to discourage reorgs. First introduced in the bitcoin-core wallet, but now most wallets set the nLockTime field of their transactions to the next block.
This prevents, in a future where miners would mainly be compensated for their work by transaction fees, a pernicious incentive to rollback the last block if it included a high fee-paying transaction.