UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'dunyZoUSGhBcNWYf8I6ZQ//f4lJYZql+sr3jrmRY5Ag='
WHERE
key_id = '07467deb97236c62ec3112edf020daee26c18fe41e8fa82e78df87b2d306c3b0'
AND (
token = 'dunyZoUSGhBcNWYf8I6ZQ//f4lJYZql+sr3jrmRY5Ag='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)