UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'qiSS5twKu8F4W5FCF325iH7oSmKD7S0ZbYewpjm7T48=' 
WHERE 
  key_id = '44ee60abd0f602d9c292cce955d5495e16fe61863b43a6b58a635cb4a02f8d9f' 
  AND (
    token = 'qiSS5twKu8F4W5FCF325iH7oSmKD7S0ZbYewpjm7T48=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031