UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'e6myvwBlmBg16EusPO7DGhbA8jbMWmxFdvJx5P/wfR4=' 
WHERE 
  key_id = '14b61f48fdea2702ba34e165150d4c42f3d4339193c0a9fa5c7fb4917b46e169' 
  AND (
    token = 'e6myvwBlmBg16EusPO7DGhbA8jbMWmxFdvJx5P/wfR4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00044