UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'VlmGDTQ3wLdQet7+AmIoQ5VI2z2GZQG3gLnGSH2qtzw=' 
WHERE 
  key_id = 'cd61d23b6a4f25bafa81f6320fafdf2578f77e0e820c5cc3a27276f4fff7be9b' 
  AND (
    token = 'VlmGDTQ3wLdQet7+AmIoQ5VI2z2GZQG3gLnGSH2qtzw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00014