UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hxZnqKyQH01DiJWtLjqbXJEMjYEEbJKY7ZQ+HnzhTV0='
WHERE
key_id = '0b90d703f7cbf8463eaf56ed9f88368193cf3fe91964a01401a5545f6589a1bb'
AND (
token = 'hxZnqKyQH01DiJWtLjqbXJEMjYEEbJKY7ZQ+HnzhTV0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)