UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cQ84m4u81AoN7UVgLw7EmWgkgilv/TmTs7BiwPl8Mzs='
WHERE
key_id = '67ab37257e46e7d69b6e021784b00fbc4f9e691ebbbe3b5c3c394dd7f9e4f58d'
AND (
token = 'cQ84m4u81AoN7UVgLw7EmWgkgilv/TmTs7BiwPl8Mzs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)