UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '0/fxIWbDWdpGZGaFFGDMmmqIgEgNCo50UKZa6tRN38g=' 
WHERE 
  key_id = 'a18ea613936f6ddc79ee1224c6c1ff0e35306895aa4443e65cf264587b77f9af' 
  AND (
    token = '0/fxIWbDWdpGZGaFFGDMmmqIgEgNCo50UKZa6tRN38g=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039