Unlocks given key only if current thread owns the lock. If optional filter
will not pass, then unlock will not happen. If the key being unlocked was
never locked by current thread, then this method will do nothing.
Locks are not transactional and should not be used from within transactions. If you do
need explicit locking within transaction, then you should use
TransactionConcurrency#PESSIMISTIC concurrency control for transaction
which will acquire explicit locks for relevant cache operations.