In case of a 51% attack to roll back any chain to a specific moment, the chain could be rolled back at any state in the past in matter of minutes/blocks, or the attack should last as much the time passed from the event that should be reverted till the start of the attack?
Neither exactly, but your second statement is closer to the truth.
When an attacker launches a 51% attack, they have to start mining an alternate chain from the block they want to reverse. Only when their alternate chain becomes longer than the current chain will it displace it and be classed as the "main chain". If they start their 51% attack from the last block, then they only have to overcome a one block deficit to become the main chain. If they start from 100 blocks ago, then they need to overcome a 100 block deficit. Bear in mind that during their attack, honest miners will still be mining on the current chain, so by the time the attacker has overcome this 100 block deficit, there will be further blocks to overcome, depending on the currency hashrate and difficulty of the network.
This is why transactions are "safer" with more confirmations, and many places require 6 confirmations before considering a transaction fully complete. A 1 block deficit would be relatively easy to overcome, whereas it gets progressively harder with each additional confirmation, as a 51% attacker has to start from a bigger deficit.