UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5VQZvYhsGm8kObJKcts1oMoS1VOdFa/MRM8o9s07+pk=' 
WHERE 
  key_id = '7cedace131d820123fcd25bd8f0161508616d522d3ae19516fe10bd6005a43fc' 
  AND (
    token = '5VQZvYhsGm8kObJKcts1oMoS1VOdFa/MRM8o9s07+pk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035