UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HvdUKhmrUhV18uwYQXe1NoJ5TAp+fnuqmfR3Uv55v/M='
WHERE
key_id = 'e4469758666f7733ea8aacf679ecec56411e9ee1b85c8eb2953794f442f6b444'
AND (
token = 'HvdUKhmrUhV18uwYQXe1NoJ5TAp+fnuqmfR3Uv55v/M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)