func NewLock(client redis.Cmdable, key string) sessions.Lock {
	return &Lock{
		client: client,
		locker: redislock.New(client),
		key:    key,
	}
}
NewLock instantiate a new lock instance. This will not yet apply a lock on Redis side.
For that you have to call Obtain(ctx context.Context, expiration time.Duration)
package redis
import (
	"context"
	"errors"
	"fmt"
	"time"
	"github.com/bsm/redislock"
	"github.com/go-redis/redis/v8"
	"github.com/oauth2-proxy/oauth2-proxy/v7/pkg/apis/sessions"
)
const LockSuffix = "lock"
type Lock struct {
	client redis.Cmdable
	locker *redislock.Client
	lock   *redislock.Lock
	key    string
}