UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VWdQi+RsprPbns0LMEqCqmJCqzVOXrwcs7SaG/Zum0U='
WHERE
key_id = '68550fe09f3ccf5af57e61b743683ab027f0eb9f3283bfbc572b9ed238fac0a3'
AND (
token = 'VWdQi+RsprPbns0LMEqCqmJCqzVOXrwcs7SaG/Zum0U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)