UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/LZ8mHzT+ArGT/wVVLi5haJh16GD8NFb0Za/oKMAFzk='
WHERE
key_id = '6a908b07e17a0218a29401af6d0c896a60b9fdca09307feef261b6693dbb63c9'
AND (
token = '/LZ8mHzT+ArGT/wVVLi5haJh16GD8NFb0Za/oKMAFzk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)