UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'E5dEb1e7FtQyz5pZM1QMZEVEboU9a8V8qikhtcujEMM=' 
WHERE 
  key_id = '6b91adbcfc8bacea914fa76f8b8e7f6c98879ee16a01a06b78762dfb7539326c' 
  AND (
    token = 'E5dEb1e7FtQyz5pZM1QMZEVEboU9a8V8qikhtcujEMM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032