UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'JdGxHgnuV7lgII7saRJCEQqnfPLnXDkY88E0JcZ01KE=' 
WHERE 
  key_id = '72a3493b59d1c2d3cf4dfa1e376768b76cbb01409ec066e64f656d1c894889e6' 
  AND (
    token = 'JdGxHgnuV7lgII7saRJCEQqnfPLnXDkY88E0JcZ01KE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020