UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'paITCbihtLh+FuxYTmatphr0wrY1R9h3bGuGdRN7A8o='
WHERE
key_id = '192ee5639a1ea1e0c31c134d2eebe0f986c34b0a86a6460809aecd0fac4df5c0'
AND (
token = 'paITCbihtLh+FuxYTmatphr0wrY1R9h3bGuGdRN7A8o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)