If you have 2 keys, you will have a theoretical scenario of the best probability of a 1 in 2 ^ X collision, where X is the number of bits in your hash algorithm. The best case is that the input signal will usually be ASCII, which does not use full encoding, and hashing functions do not propagate perfectly, so they will often encounter a theoretical maximum in real life.
To answer your last question:
Another point: if the number of hash characters is less than the number of characters in the sha1 hash, is it not always unique?
Yes it's true. But you will have another problem creating unique keys of this size. The easiest way is to have a checksum, so just select a big enough digest so that the space for conflicts is small enough for your comfort.
As @wayne shows, a very used approach is to combine microtime() with your random salt (and base64_encode to increase entropy).
source share