UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+cl6OCJQtRowRjBi86ygb0uTNvZzlUOxJ+fOCupNYVo=' 
WHERE 
  key_id = 'f737137a6c5a75ad5df3e603b47c02f57ab1bee3d911b79914f80d3b0bc8c657' 
  AND (
    token = '+cl6OCJQtRowRjBi86ygb0uTNvZzlUOxJ+fOCupNYVo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036